﻿@page
@model Web.Pages.SLModel
@{
    var data = ViewData["data"] as DonetSpider.MovieInfo;
    var name = data.Id > 0 ? "已收录" : "收录";
    var disabled = data.Id > 0 ? "disabled" : "";
}
<h3>@data.Name</h3>

<div class="container text-center" style=" text-align:left">
  <div class="row">

                 <div class="col-6">
<img src="@data.ImageUrl" class="img-fluid" alt="...">
                </div>
                                 <div class="col-6">
<p style="text-align:left">@data.Des</p>
                </div>
                                 <div class="col-12">
<div class="col-12">
<form method="post" style="margin-top:10px;">
    <input asp-for="msg"  type="text" class="form-control" id="exampleInputEmail1" hidden>
    <input type="submit" @disabled class="form-control btn btn-primary" value="@name">
</form>
</div>

<div class="accordion accordion-flush" id="accordionExample" style="margin-top:12px;">

        @foreach(var title in data.Sourse )
        {
  <div class="accordion-item">
    <h4 class="accordion-header" id="h_@title.Key">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#i__@title.Key" aria-expanded="false" aria-controls="i__@title.Key">
        @title.Key
      </button>
    </h4>
    <div id="i__@title.Key" class="accordion-collapse collapse" aria-labelledby="h_@title.Key" data-bs-parent="#accordionExample">
      <div class="accordion-body" style="padding:0px; margin-top:12px; margin-bottom:12px;">

                                                  @foreach(var item in title.Value)
                                    {
                                        <a class="btn btn-outline-primary col-3 col-md-1" href="P?u=@item.SourseUrl&s=1&p=@data.Id" style="float:left">@item.Title</a>
                                    }
      </div>
    </div>
  </div>
        }
</div>
                </div>

  </div>
</div>

